<div id="content">
<% if logged_in? %>
<h2>Listing pages</h2>
<table>
	<% @pages.each do |page|%>
		<tr> 
				<td><%= link_to "#{page.page_title}", page %> </td>
				<% if authorized? %>
				<td><%= link_to 'Edit', edit_page_path(page)%></td>
				<td><%= link_to 'Destroy', page_path(page), :comfirm => "really?", :method => :delete%></td>
				<% end %>
		</tr>
	<% end %>
</table>
<% end %>
</div>
